const express = require('express')

const app = express()

app.set('secret','i14141ki31h4bj14j1i41')
app.set('role','99999999')

app.use(require('cors')())
app.use(express.json())
app.use('/admin',express.static(__dirname + '/admin'))
app.use('/uploads',express.static(__dirname + '/uploads'))


// 引用数据库
require('./plugins/db')(app)
require('./routes/admin')(app)

app.listen(9001,()=>{
    console.log('App listening on port 9001!','http://localhost:9001')
})